<?
/*Anzeige einer Prozessleiste(Gauge)
Wert
Name
*/

if(0<=$_REQUEST[wert] AND $_REQUEST[wert]<=100)
{
	header("Content-type: image/jpeg");
	header("Cache-Control: no-cache, must-revalidate");
	header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");                  // Date in the past   
	header('Last-Modified: '.gmdate('D, d M Y H:i:s') . ' GMT');

    $main=imagecreatefrompng("images/gauge_main.png"); //327px breit
	$red=imagecreatefrompng("images/gauge_red.png");
    $breite=round((327-8)/100*intval($_REQUEST[wert]));
    if($breite>0){
	    imagecopyresized($main,$red,4,5,0,0,$breite,16,imagesx($red),imagesy($red));
	}
	$verdana=imageloadfont("images/verdanabold.gdf");
	imagestring($main,$verdana,161-(strlen($_REQUEST[text])*5),3,$_REQUEST[text],imagecolorallocate($main,100,100,100));
	imagestring($main,$verdana,160-(strlen($_REQUEST[text])*5),4,$_REQUEST[text],imagecolorallocate($main,255,255,255));
    imagepng($main);
}